「R」拓展你的 RStudio 主题

您所在的位置:网站首页 rstudio github 「R」拓展你的 RStudio 主题

「R」拓展你的 RStudio 主题

#「R」拓展你的 RStudio 主题| 来源: 网络整理| 查看: 265

接下来歇会,把手头的工作忙好,学习完 Shiny 的案例研究再发文。

默认 RStudio 并没有像我们熟知的各类编辑器提供非常丰富的主题,大部分看起来都挺丑的。今天看到 GitHub 上有一个插件包 rsthemes,一起来看看吧。

安装

先装包:

# install.packages("devtools") devtools::install_github("gadenbuie/rsthemes")

再装主题:

> rsthemes::install_rsthemes(include_base16 = TRUE) √ Installed 84 themes i Use `rsthemes::list_rsthemes()` to list installed themes i Use `rstudioapi::applyTheme()` to enable a theme 使用

上面安装好之后已经有文字提示我们怎么使用了,另外我们可以通过 RStudio 的主题选择器进行选择。

最好的办法是在控制台运行下面的语句依次预览显示效果:

rsthemes::try_rsthemes()

也可以只查看一个类别的主题:

# Try just the light, dark, or base16 themes, e.g. rsthemes::try_rsthemes("light")

建议深色可能好些,比较保护眼睛,一般而言文字、文件名都比较容易看得清楚。

确定好自己喜欢的主题名字以后,按下面方式设置即可。

rstudioapi::applyTheme("One Dark {rsthemes}")

更多设置,看这个包的 README[1] 吧,不多说了。

参考资料

[1]README: https://github.com/gadenbuie/rsthemes/blob/master/README.md



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3